<link href="<?php echo base_url('theme/css/frontend/account-manager.css'); ?>" rel="stylesheet">
<link href="<?php echo base_url(); ?>theme/third_party/jQueryTagging/styles/token-input.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>theme/third_party/jQueryTagging/styles/token-input-facebook.css" rel="stylesheet">
<script src="<?php echo base_url(); ?>theme/third_party/jQueryTagging/src/jquery.tokeninput.js" type="text/javascript"></script>
<script type='text/javascript'>
    $(document).ready(function() {
        $("#work_place_select").tokenInput("/recruitment/place", {
            prePopulate: <?php if (isset($json) && $json != "") {
                echo $json;
            } else {
                echo "''";
            } ?>,
            theme: "facebook",
            preventDuplicates: true,
            tokenLimit: 3
        });
    });
</script>
<div class="account-wrapper">
  <?php echo validation_errors('<div class="alert alert-error">','</div>'); ?>
  <h3>Đăng ký thông tin tuyển dụng</h3>
  <hr class="hr" />  
   
  <form method="post" class="form-horizontal account-container" action=<?php echo base_url('recruitment/add'); ?>>
    <h5>Thông tin cá nhân</h5>
    <hr class="hr" />
    <div class="form-wrapper">
      <div class="control-group">
        <label class="control-label">Ảnh đại diện</label>
        <div class="controls">
        <?php if(empty($user['avatar'])): ?>
          <img style="width:100px; height:110px;" class="img-polaroid" src="<?php echo base_url('theme/images/frontend/user-default-avatar.jpg'); ?>">
        <?php else: ?>
          <img style="width:100px; height:110px;" class="img-polaroid" src="<?php echo base_url('upload/user/' . $user['user_id'] . '/' . $user['avatar']); ?>">
        <?php endif; ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">Họ và tên</label>
        <div class="controls"><?php echo $user['real_name']; ?></div>
      </div>
      <div class="control-group">
        <label class="control-label">Ngày sinh</label>
        <div class="controls"><?php echo date('d/m/Y', strtotime($user['birthday'])); ?></div>
      </div>
      <div class="control-group">
        <label class="control-label">Giới tính</label>
        <div class="controls"><?php echo getSexType($user['sex']); ?></div>
      </div>
      <div class="control-group">
        <label class="control-label">Địa chỉ</label>
        <div class="controls"><?php echo $user['address']; ?></div>
      </div>
      <div class="control-group">
        <label class="control-label">Email</label>
        <div class="controls"><?php echo $user['email']; ?></div>
      </div>
      <div class="control-group">
        <label class="control-label">Điện thoại</label>
        <div class="controls"><?php echo $user['tel']; ?></div>
      </div>
      <div class="control-group">
        <label class="control-label">Tình trạng hôn nhân</label>
        <div class="controls"><?php echo $user['married']; ?></div>
      </div>
      <div class="control-group">
		  <a class="pull-right" href="<?php echo base_url('user/changingAccountInformation'); ?>">Chỉnh sửa thông tin cá nhân</a>
      </div>
    </div>
  </form> 
  
  <form method="post" class="form-horizontal account-container" action=<?php echo base_url('recruitment/add'); ?>>
    <h5>Trình độ học vấn</h5>
    <hr class="hr" />
    <div class="form-wrapper">
      <div class="control-group">
        <label for="education" class="control-label">Trình độ học vấn</label>
        <div class="controls">
       	  <select name=education id=education>    
    		<option value=0 <?php echo set_select('education', '0', $recruitment['education']==0?TRUE:FALSE); ?>>-Chọn trình độ học vấn-</option>
            <option value=1 <?php echo set_select('education', '1', $recruitment['education']==1?TRUE:FALSE); ?>>Trên đại học</option>
            <option value=2 <?php echo set_select('education', '2', $recruitment['education']==2?TRUE:FALSE); ?>>Đại học</option>
            <option value=3 <?php echo set_select('education', '3', $recruitment['education']==3?TRUE:FALSE); ?>>Cao đẳng</option>
    		<option value=4 <?php echo set_select('education', '4', $recruitment['education']==4?TRUE:FALSE); ?>>Trung cấp</option>
         	<option value=5 <?php echo set_select('education', '5', $recruitment['education']==5?TRUE:FALSE); ?>>Trung học</option>
                <option value=6 <?php echo set_select('education', '6', $recruitment['education']==6?TRUE:FALSE); ?>>Không yêu cầu</option>
          </select>	
       	</div>
      </div>
      <div class="control-group">
        <label for="discipline" class="control-label">Ngành học</label>
        <div class="controls">
          <input type=text name=discipline id=discipline value="<?php echo set_value('discipline', $recruitment['discipline']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <label for="graduation_year" class="control-label">Tốt nghiệp năm</label>
        <div class="controls">
          <input type=text name=graduation_year style="width: 248px!important;" id=graduation_year class="half" value="<?php echo set_value('graduation_year', $recruitment['graduation_year']); ?>">
       	  <select name=degree id=degree class="half">    
    		<option value=0 <?php echo set_select('degree', '0', $recruitment['degree']==0?TRUE:FALSE); ?>>-Chọn loại tốt nghiệp-</option>
            <option value=1 <?php echo set_select('degree', '1', $recruitment['degree']==1?TRUE:FALSE); ?>>Xuất sắc</option>
            <option value=2 <?php echo set_select('degree', '2', $recruitment['degree']==2?TRUE:FALSE); ?>>Giỏi</option>
            <option value=3 <?php echo set_select('degree', '3', $recruitment['degree']==3?TRUE:FALSE); ?>>Khá</option>
    		<option value=4 <?php echo set_select('degree', '4', $recruitment['degree']==4?TRUE:FALSE); ?>>Trung bình khá</option>
    		<option value=5 <?php echo set_select('degree', '5', $recruitment['degree']==5?TRUE:FALSE); ?>>Trung bình</option>
          </select>	
       	</div>
      </div>
      <div class="control-group">
        <label for="school" class="control-label">Tốt nghiệp tại trường</label>
        <div class="controls">
          <input type=text name=school id=school value="<?php echo set_value('school', $recruitment['school']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <label for="languages" class="control-label">Tình độ ngoại ngữ</label>
        <div class="controls">
          <input type=text name=languages id=languages style="width: 248px!important;" class="half" value="<?php echo set_value('languages', $recruitment['languages']); ?>">
       	  <select name=languages_degree id=languages_degree class="half">    
    		<option value=0 <?php echo set_select('languages_degree', '0', $recruitment['languages_degree']==0?TRUE:FALSE); ?>>-Chọn loại tốt nghiệp-</option>
            <option value=1 <?php echo set_select('languages_degree', '1', $recruitment['languages_degree']==1?TRUE:FALSE); ?>>Xuất sắc</option>
            <option value=2 <?php echo set_select('languages_degree', '2', $recruitment['languages_degree']==2?TRUE:FALSE); ?>>Giỏi</option>
            <option value=3 <?php echo set_select('languages_degree', '3', $recruitment['languages_degree']==3?TRUE:FALSE); ?>>Khá</option>
    		<option value=4 <?php echo set_select('languages_degree', '4', $recruitment['languages_degree']==4?TRUE:FALSE); ?>>Trung bình khá</option>
    		<option value=5 <?php echo set_select('languages_degree', '5', $recruitment['languages_degree']==5?TRUE:FALSE); ?>>Trung bình</option>
          </select>	
       	</div>
      </div>
      <div class="control-group">
        <label for="certificate" class="control-label">Các bằng cấp khác</label>
        <div class="controls">
          <input type=text name=certificate id=certificate value="<?php echo set_value('certificate', $recruitment['certificate']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <div class=controls>
          <button class="btn btn-primary" type=submit name=education-submit value="Lưu thay đổi">Lưu thay đổi</button>
          <button class="btn" type="button">Hủy bỏ</button>
        </div>
      </div>
    </div>
  </form>
  <form method="post" class="form-horizontal account-container" action=<?php echo base_url('recruitment/add'); ?>>
	<h5>Kinh nghiệm làm việc</h5>
    <hr class="hr" />
    <div class="form-wrapper">
      <div class="control-group">
        <label for="years_of_experience" class="control-label">Số năm kinh nghiệm</label>
        <div class="controls">
          <select name=years_of_experience id=years_of_experience>    
    		<option value=0 <?php echo set_select('years_of_experience', '0', $recruitment['years_of_experience']==0?TRUE:FALSE); ?>>-Chọn số năm kinh nghiệm-</option>
            <option value=1 <?php echo set_select('years_of_experience', '1', $recruitment['years_of_experience']==1?TRUE:FALSE); ?>>Chưa có kinh nghiệm</option>
            <option value=2 <?php echo set_select('years_of_experience', '2', $recruitment['years_of_experience']==2?TRUE:FALSE); ?>>Dưới 1 năm</option>
            <option value=3 <?php echo set_select('years_of_experience', '3', $recruitment['years_of_experience']==3?TRUE:FALSE); ?>>1 năm</option>
    		<option value=4 <?php echo set_select('years_of_experience', '4', $recruitment['years_of_experience']==4?TRUE:FALSE); ?>>2 năm</option>
    		<option value=5 <?php echo set_select('years_of_experience', '5', $recruitment['years_of_experience']==5?TRUE:FALSE); ?>>3 năm</option>
    		<option value=6 <?php echo set_select('years_of_experience', '6', $recruitment['years_of_experience']==6?TRUE:FALSE); ?>>4 năm</option>
    		<option value=7 <?php echo set_select('years_of_experience', '7', $recruitment['years_of_experience']==7?TRUE:FALSE); ?>>5 năm</option>
    		<option value=8 <?php echo set_select('years_of_experience', '8', $recruitment['years_of_experience']==8?TRUE:FALSE); ?>>Trên 5 năm</option>
          </select>	
       	</div>
      </div>
      <div class="control-group">
        <label for="experience" class="control-label">Kinh nghiệm</label>
        <div class="controls">
          <textarea rows=3 name="experience"><?php echo set_value('experience', $recruitment['experience']); ?></textarea>
       	</div>
      </div>
      <div class="control-group">
        <label for="skills" class="control-label">Các kỹ năng</label>
        <div class="controls">
          <input type=text name=skills id=skills value="<?php echo set_value('skills', $recruitment['skills']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <div class=controls>
          <button class="btn btn-primary" type=submit name=experience-submit value="Lưu thay đổi">Lưu thay đổi</button>
          <button class="btn" type="button">Hủy bỏ</button>
        </div>
      </div>
    </div>
  </form>
  <form method="post" class="form-horizontal account-container" action=<?php echo base_url('recruitment/add'); ?>> 
    <h5>Công việc mong muốn</h5>
    <hr class="hr" />
    <div class="form-wrapper">
      <div class="control-group">
        <label for="position" class="control-label">Vị trí mong muốn</label>
        <div class="controls">
          <select name=position id=position>    
    		<option value=0 <?php echo set_select('position', '0', $recruitment['position']==0?TRUE:FALSE); ?>>-Chọn vị trí mong muốn-</option>
                <option value=1 <?php echo set_select('position', '1', $recruitment['position']==1?TRUE:FALSE); ?>>Phó giám đốc</option>
                <option value=2 <?php echo set_select('position', '2', $recruitment['position']==2?TRUE:FALSE); ?>>Giám đốc</option>
                <option value=3 <?php echo set_select('position', '3', $recruitment['position']==3?TRUE:FALSE); ?>>Tổng giám đốc điều hành</option>
    		<option value=4 <?php echo set_select('position', '4', $recruitment['position']==4?TRUE:FALSE); ?>>Phó chủ tịch</option>
    		<option value=5 <?php echo set_select('position', '5', $recruitment['position']==5?TRUE:FALSE); ?>>Chủ tịch</option>
          </select>	
       	</div>
      </div>
      <div class="control-group">
        <label for="level" class="control-label">Cấp bậc mong muốn</label>
        <div class="controls">
          <select name=level id=level>    
    		<option value=0 <?php echo set_select('level', '0', $recruitment['level']==0?TRUE:FALSE); ?>>-Chọn cấp bậc mong muốn-</option>
            <option value=1 <?php echo set_select('level', '1', $recruitment['level']==1?TRUE:FALSE); ?>>Quản trị cao cấp</option>
            <option value=2 <?php echo set_select('level', '2', $recruitment['level']==2?TRUE:FALSE); ?>>Trưởng/Phó phòng</option>
            <option value=3 <?php echo set_select('level', '3', $recruitment['level']==3?TRUE:FALSE); ?>>Tư vấn/Trợ lý</option>
    		<option value=4 <?php echo set_select('level', '4', $recruitment['level']==4?TRUE:FALSE); ?>>Chuyên gia</option>
    		<option value=5 <?php echo set_select('level', '5', $recruitment['level']==5?TRUE:FALSE); ?>>Nhân viên</option>
    		<option value=6 <?php echo set_select('level', '6', $recruitment['level']==6?TRUE:FALSE); ?>>Trưởng nhóm/Giám sát</option>
    		<option value=7 <?php echo set_select('level', '7', $recruitment['level']==7?TRUE:FALSE); ?>>Kỹ thuật viên/Kỹ sư</option>
    		<option value=8 <?php echo set_select('level', '8', $recruitment['level']==8?TRUE:FALSE); ?>>Chuyên viên</option>
          </select>	
       	</div>
      </div>
      <div class="control-group">
        <label for="career" class="control-label">Ngành nghề</label>
        <div class="controls">
          <a href="<?php echo base_url('recruitment/career'); ?>" rel=careerPopup>
            <input type=text id=career_input value="<?php echo set_value('careerPopup', getCareerType($recruitment['career'])); ?>">	
            <input type=hidden name=career id=career value="<?php echo set_value('career', $recruitment['career']); ?>">             	
          </a>
          <script type="text/javascript">
          $(document).ready(function(){
            $("a[rel^='careerPopup']").prettyPhoto({
              type: 'city',
              ajaxcallback: function() {
            	// city popup
  	            $(".category-list ul li a, .category-list h4 a").click(function(){ 
  	              $('#career_input').val($(this).text()); 
  	              $('#career').val($(this).data('category'));
  	              $.prettyPhoto.close();
  	          	  return false;
  	            }); 
              },
              markup: '<div class="pp_container" role="dialog"><div class="pp_loaderIcon"></div><div class="pp_placeholder"></div></div><div class="pp_overlay"></div>'
            });
          });
          </script>
       	</div>
      </div>
      <div class="control-group">
        <label for="method" class="control-label">Hình thức làm việc</label>
        <div class="controls">
          <select name=method id=method>    
    		<option value=0 <?php echo set_select('method', '0', $recruitment['method']==0?TRUE:FALSE); ?>>-Chọn hình thức làm việc-</option>
            <option value=1 <?php echo set_select('method', '1', $recruitment['method']==1?TRUE:FALSE); ?>>Toàn thời gian cố định</option>
            <option value=2 <?php echo set_select('method', '2', $recruitment['method']==2?TRUE:FALSE); ?>>Toàn thời gian tạm thời</option>
            <option value=3 <?php echo set_select('method', '3', $recruitment['method']==3?TRUE:FALSE); ?>>Bán thời gian cố định</option>
    		<option value=4 <?php echo set_select('method', '4', $recruitment['method']==4?TRUE:FALSE); ?>>Bán thời gian tạm thời</option>
    		<option value=5 <?php echo set_select('method', '5', $recruitment['method']==5?TRUE:FALSE); ?>>Theo hợp đồng tư vấn</option>
    		<option value=6 <?php echo set_select('method', '6', $recruitment['method']==6?TRUE:FALSE); ?>>Thực tập</option>
          </select>	
       	</div>
      </div>      
      <div class="control-group">
       	<label for="work_place" class="control-label">Nơi làm việc</label>
       	<div class="controls">
            <input type=text id=work_place_select class="input-xxlarge" value="<?php echo set_value('work_place', getCity($recruitment['work_place'])); ?>">	
            <input type=hidden name=work_place id=work_place value="<?php echo set_value('work_place', $recruitment['work_place']); ?>">             	
          <script type="text/javascript">
          $(document).ready(function(){
            // City popup
            $("a[rel^='postAreaPopup']").prettyPhoto({
              type: 'city',
              ajaxcallback: function() {
            	// city popup
  	            $(".city-list ul li a, .city-list h4 a").click(function(){ 
  	              $('#work_place_select').val($(this).text()); 
  	              $('#work_place').val($(this).data('city'));
  	              $.prettyPhoto.close();
  	          	  return false;
  	            }); 
              },
              markup: '<div class="pp_container" role="dialog"><div class="pp_loaderIcon"></div><div class="pp_placeholder"></div></div><div class="pp_overlay"></div>',
              height: 340,
              width: 880
            });
          });
          </script>
        </div>
      </div>
      <div class="control-group">
        <label for="salary" class="control-label">Mức lương mong muốn</label>
        <div class="controls">
          <input type=text name=salary id=salary value="<?php echo set_value('salary', $recruitment['salary']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <label for="objective" class="control-label">Mục tiêu nghề nghiệp</label>
        <div class="controls">
          <input type=text name=objective id=objective value="<?php echo set_value('objective', $recruitment['objective']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <div class=controls>
          <button class="btn btn-primary" type=submit name=expect-submit value="Lưu thay đổi">Lưu thay đổi</button>
          <button class="btn" type="button">Hủy bỏ</button>
        </div>
      </div>
    </div>
  </form>
  <form method="post" class="form-horizontal account-container" action=<?php echo base_url('recruitment/add'); ?>>
    <h5>Thông tin liên hệ</h5>
    <hr class="hr" />
    <div class="form-wrapper">
      <div class="control-group">
        <label for="contact_name" class="control-label">Họ và tên</label>
        <div class="controls">
          <input type=text name=contact_name id=contact_name value="<?php echo set_value('contact_name', $recruitment['contact_name']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <label for="contact_email" class="control-label">Email</label>
        <div class="controls">
          <input type=text name=contact_email id=contact_email value="<?php echo set_value('contact_email', $recruitment['contact_email']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <label for="contact_tel" class="control-label">Điện thoại</label>
        <div class="controls">
          <input type=text name=contact_tel id=contact_tel value="<?php echo set_value('contact_tel', $recruitment['contact_tel']); ?>">
       	</div>
      </div>
      <div class="control-group">
        <div class=controls>
          <button class="btn btn-primary" type=submit name=contact-submit value="Lưu thay đổi">Lưu thay đổi</button>
          <button class="btn" type="button">Hủy bỏ</button>
        </div>
      </div>
    </div>
  </form> 
</div>